package com.ruoyi.app.service.impl;

import java.util.List;

import com.ruoyi.app.domain.AppOrganization;
import com.ruoyi.app.mapper.AppOrganizationMapper;
import com.ruoyi.app.service.IAppOrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 组织Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-04
 */
@Service
public class AppOrganizationServiceImpl implements IAppOrganizationService
{
    @Autowired
    private AppOrganizationMapper appOrganizationMapper;

    /**
     * 查询组织
     * 
     * @param organizationId 组织主键
     * @return 组织
     */
    @Override
    public AppOrganization selectAppOrganizationByOrganizationId(Long organizationId)
    {
        return appOrganizationMapper.selectAppOrganizationByOrganizationId(organizationId);
    }

    /**
     * 查询组织列表
     * 
     * @param appOrganization 组织
     * @return 组织
     */
    @Override
    public List<AppOrganization> selectAppOrganizationList(AppOrganization appOrganization)
    {
        return appOrganizationMapper.selectAppOrganizationList(appOrganization);
    }

    /**
     * 新增组织
     * 
     * @param appOrganization 组织
     * @return 结果
     */
    @Override
    public int insertAppOrganization(AppOrganization appOrganization)
    {
        return appOrganizationMapper.insertAppOrganization(appOrganization);
    }

    /**
     * 修改组织
     * 
     * @param appOrganization 组织
     * @return 结果
     */
    @Override
    public int updateAppOrganization(AppOrganization appOrganization)
    {
        return appOrganizationMapper.updateAppOrganization(appOrganization);
    }

    /**
     * 批量删除组织
     * 
     * @param organizationIds 需要删除的组织主键
     * @return 结果
     */
    @Override
    public int deleteAppOrganizationByOrganizationIds(Long[] organizationIds)
    {
        return appOrganizationMapper.deleteAppOrganizationByOrganizationIds(organizationIds);
    }

    /**
     * 删除组织信息
     * 
     * @param organizationId 组织主键
     * @return 结果
     */
    @Override
    public int deleteAppOrganizationByOrganizationId(Long organizationId)
    {
        return appOrganizationMapper.deleteAppOrganizationByOrganizationId(organizationId);
    }
}
